package com.zht.user_manger.common;

/**
 * 自定义错误码
 *
 */
public enum ErrorCode {

    PARAMS_ERROR(40000, "Bad Request"),
    NOT_LOGIN_ERROR(40100, "Please Login"),
    NO_AUTH_ERROR(40200, "Inadequate Permissions"),
    NOT_FOUND_ERROR(40400, "Request non-existent"),
    FORBIDDEN_ERROR(40300, "禁止访问"),
    SYSTEM_ERROR(50000, "系统内部异常"),
    OPERATION_ERROR(50001, "操作失败"),
    API_REQUEST_ERROR(50010, "接口调用失败");

    /**
     * 状态码
     */
    private final int code;

    /**
     * 信息
     */
    private final String message;


    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
